package com.ruoyi.exam.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.ExamStudentMapper;
import com.ruoyi.exam.domain.ExamStudent;
import com.ruoyi.exam.service.IExamStudentService;

/**
 * 学生管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-11
 */
@Service
public class ExamStudentServiceImpl implements IExamStudentService 
{
    @Autowired
    private ExamStudentMapper examStudentMapper;

    /**
     * 查询学生管理
     * 
     * @param studentId 学生管理主键
     * @return 学生管理
     */
    @Override
    public ExamStudent selectExamStudentByStudentId(Long studentId)
    {
        return examStudentMapper.selectExamStudentByStudentId(studentId);
    }

    /**
     * 查询学生管理列表
     * 
     * @param examStudent 学生管理
     * @return 学生管理
     */
    @Override
    public List<ExamStudent> selectExamStudentList(ExamStudent examStudent)
    {
        return examStudentMapper.selectExamStudentList(examStudent);
    }

    /**
     * 新增学生管理
     * 
     * @param examStudent 学生管理
     * @return 结果
     */
    @Override
    public int insertExamStudent(ExamStudent examStudent)
    {
        examStudent.setCreateTime(DateUtils.getNowDate());
        return examStudentMapper.insertExamStudent(examStudent);
    }

    /**
     * 修改学生管理
     * 
     * @param examStudent 学生管理
     * @return 结果
     */
    @Override
    public int updateExamStudent(ExamStudent examStudent)
    {
        examStudent.setUpdateTime(DateUtils.getNowDate());
        return examStudentMapper.updateExamStudent(examStudent);
    }

    /**
     * 批量删除学生管理
     * 
     * @param studentIds 需要删除的学生管理主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentByStudentIds(Long[] studentIds)
    {
        return examStudentMapper.deleteExamStudentByStudentIds(studentIds);
    }

    /**
     * 删除学生管理信息
     * 
     * @param studentId 学生管理主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentByStudentId(Long studentId)
    {
        return examStudentMapper.deleteExamStudentByStudentId(studentId);
    }
}
